﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using RestSharp;
using WebApplicationDemo3.Contract;
using Ymatou.ServiceCenter;

namespace WebApplicationDemo2
{
    [ServiceRegister("api.aspx", Method.GET)]
    public partial class api : System.Web.UI.Page
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            string clientIp = Request.GetClientIp();
            string serverIpLink = Request.GetServerIpLink();

            EmptyRequest request = new EmptyRequest();
            EmptyResponse response = ServiceClient.Execute<EmptyRequest, EmptyResponse>(request);
            Response.Write("demo2 " + string.Format("clientIp:{0};serverIpLink:{1}",clientIp,serverIpLink) + "+" +response.Result);
            Response.End();
        }
    }
}